<caltech-header title="Customer">
    <h3>Customer</h3>
    <h4 ng-show="model.certificateNo">Report No. {{model.certificateNo}}</h4>
</caltech-header>

<div novalidate class="form form-horizontal" name="customerForm">
    <div class="form-group">
        <div class="col-xs-6">
            <label for="name">Name</label>
            <a href="#" editable-text="model.name" buttons="no" e-name="name" blur="submit" e-required>{{model.name}}</a>
        </div>
        <div class="col-xs-6">
            <label for="address">Address</label>
            <a href="#" editable-text="model.address" buttons="no" e-name="address" blur="submit">{{model.address}}</a>
        </div>
    </div>
    <div class="form-group">
        <div class="col-xs-6">
            <label for="contactPersonName">Contact person</label>
            <a href="#" editable-text="model.contactPersonName" buttons="no" e-name="contactPersonName" blur="submit">{{model.contactPersonName}}</a>
        </div>
        <div class="col-xs-6">
            <label for="email">Email</label>
            <a href="#" editable-email="model.email" buttons="no" e-name="email" blur="submit">{{model.email}}</a>
        </div>
    </div>
    <div class="form-group">
        <div class="col-xs-6">
            <label for="phone">Phone</label>
            <a href="#" editable-tel="model.tel" buttons="no" e-name="tel" blur="submit">{{model.tel}}</a>
        </div>

        <div class="col-xs-6">
            <label for="mobile">Mobile</label>
            <a href="#" editable-tel="model.mobile" buttons="no" e-name="mobile" blur="submit">{{model.mobile}}</a>
        </div>
    </div>
    <div class="form-group">
        <div class="col-xs-6">
            <label for="fax">Fax</label>
            <a href="#" editable-text="model.fax" buttons="no" e-name="fax" blur="submit">{{model.fax}}</a>
        </div>
        <div class="col-xs-6">
            <label for="nextDueDate">Next due date</label>
            <a href="#" e-datepicker-popup="dd/MMM/yyyy" e-class="form-control" editable-bsdate="model.nextDueDate" buttons="no"
               e-name="nextDueDate" blur="submit">{{model.nextDueDate | date: 'dd/MMM/yyyy'}}</a>
        </div>
    </div>
    <div class="form-group">
        <div class="col-xs-6">
            <label for="CustomerUsername">Customer Username</label>
            <a href="#" ng-show="model.isExistUsername == false" editable-text="model.loginUsername" buttons="no" e-name="loginUsername" blur="submit">{{model.loginUsername}}</a>
            <span class="editable" ng-show="model.isExistUsername">{{model.loginUsername}}</span>
        </div>
        <div class="col-xs-6" ng-show="model.isExistUsername == false">
            <label for="CustomerUsername">Customer Password</label>
            <a href="#" editable-text="model.loginPassword" buttons="no" e-name="loginPassword" e-type="password" blur="submit">{{model.loginPassword }}</a>
        </div>
    </div>
    <div class="form-group">
        <div class="col-xs-6">
            <label for="fax">Salesman</label>
            <span class="form-control-static">{{model.salesmanName}}</span>
        </div>
    </div>
    <page-footer page="1"></page-footer>
</div>


    <nav class="navbar navbar-default navbar-fixed-bottom navbar-inverse" role="navigation">
        <div class="container">
            <button class="btn btn-warning navbar-btn" ng-click="back()">Back</button>
            <button class="btn btn-warning navbar-btn" has-access="Admin" busy-click="remove(model)" success="Deleted successfully" ng-show="model.id != undefined">Delete</button>
            <button class="btn btn-info navbar-btn" ng-show="model.id != undefined" ng-disabled="customerForm.$invalid" busy-click="update(model)" success="Updated successfully">Update</button>
            <button class="btn btn-info navbar-btn" ng-hide="model.id != undefined" ng-disabled="customerForm.$invalid" busy-click="save(model)" success="Created successfully">Save</button>
            <button class="btn btn-info navbar-btn" ng-show="model.id != undefined" ng-click="doPrint()"><i class="glyphicon glyphicon-print"></i> Print</button>
        </div>
    </nav>
